<?php
   $t='';
   if(isset($_POST['button'])){
       $year=$_POST['year'];
       if(is_numeric($year)){
           if($year % 4 == 0 && $year%100!==0 || $year %400==0){
           $t=$year.'是闰年';
           }else{
           $t=$year.'不是闰年';
           }
       }else{
           $t='你输入的不是数字';
       }
       

   }

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" method="POST">
       <span><?php echo $t ?></span>
       请输入年份:<input type="text" name="year"><br/>
       <input type="submit" name="button" value="判断闰年">
    </form>
</body>
</html>